Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flag_Ext_Tele can only be cleared in exit_run_mode when motors are not being reversed (turtle mode) #178

Conversation

damosvil
Copy link
Contributor

@damosvil damosvil commented Oct 5, 2023

Flag_Ext_Tele can only be cleared in exit_run_mode when motors are not being reversed (turtle mode)
That step is done in the lowest part of exit_run_mode

@damosvil damosvil self-assigned this Oct 5, 2023
@damosvil damosvil added the bug Something isn't working label Oct 5, 2023
@damosvil damosvil added this to the v0.20.1 milestone Oct 5, 2023
…t being reversed (turtle mode)

Restored default DEFAULT_PGM_SAFETY_ARM setting
@damosvil damosvil force-pushed the bugfix/exit_run_mode-keep-edt-flag-if-motor-direction-not-reversed branch from 6f723df to d621580 Compare October 5, 2023 16:02
@hyp0dermik-code
Copy link
Contributor

hyp0dermik-code commented Oct 6, 2023

Initial tests show this fixes the turtle bug but not the second activation in the motors tab.

I would like to do some further investigation into how the these two circumstances output motor signal, and whether the the signal is not sent when the slider is at 0, in which case EDT safety disarm would be expected to trip before proceeding.

I think .20.1 could be released without this merged as the current behaviour is safe. Worst case scenario the quad needs to be rearmed to reactivate turtle mode.

@damosvil
Copy link
Contributor Author

damosvil commented Oct 6, 2023

Every time you need to arm the motors you will need to enable the "I understand the risk" switch button in order enable edt dshot command 13 is sent again, otherwise motor won't arm. That is normal
If you don't send command 13 again the esc will be kept unarmed until you send it again.
The only way the esc is kept armed is when motors are inverted by dshot command 21.

You can test it in the cli with the commands motor and dshotprog:
dshotprog 0 13
dshotprog 0 21
motor 0 1100
motor 0 1000
motor 0 1100
motor 0 1000
motor 0 1100
motor 0 1000
motor 0 1100
motor 0 1000
dshotprog 0 20
motor 0 1100
motor 0 1000
motor 0 1100
motor 0 1000

@damosvil
Copy link
Contributor Author

damosvil commented Oct 7, 2023

pz check behavior here: https://youtu.be/gdARJK0sleY

Bluejay_0.20.1_RC3.zip

When edt is enabled Betaflight sends command 13 when arming the kwad, so in that case It is like clicking "I understand the risk" button

@Noctaro
Copy link

Noctaro commented Oct 8, 2023

Hi, i just tested RC3 on A-X-5 target, betaflight 4.5 and Configurator 10.10.0-debugf277b27. I am still not able to run motors via motors tab. They just keep beeping.

@damosvil
Copy link
Contributor Author

damosvil commented Oct 8, 2023

@Noctaro Does it happen the same using 4.4.0?

@Noctaro
Copy link

Noctaro commented Oct 8, 2023

@damosvil Did flash back to 4.4.0, now it works as expected :)

Update: I also checked 4.4.3, here it does not work either.

@hyp0dermik-code
Copy link
Contributor

@damosvil Did flash back to 4.4.0, now it works as expected :)

Update: I also checked 4.4.3, here it does not work either.

Can you confirm your behaviour is the same as the video above (https://youtu.be/gdARJK0sleY)

Please note on the first arm, increase value through noises until motor starts spinning (should be spining by 1050 worst case).

You can hover over the motor and use the arrow keys to slowly increase it

@Noctaro
Copy link

Noctaro commented Oct 9, 2023

@hyp0dermik-code yes i can confirm the same behaviour. Motors start running one time, then beep if i try to restart them until i reengage the "i know what i am doing" switch. Motors start running at 1010

@damosvil
Copy link
Contributor Author

@Noctaro that is the normal behaviour. I have tested It in my kwad with bf4.4.0 some days ago. It works as intended after turtling. Please could you try on your side?

@Noctaro
Copy link

Noctaro commented Oct 13, 2023

@damosvil
I have tested follwing things without powering down my copter on 4.4.0:

  • Connect to BF Config and run Motors from Motortab
  • Disconnect and Turtle
  • Hover
  • Turtle again
  • Connect to BF Config and run Motors from Motortab

Everything worked as it should. Also Turtlemode does not need the rearming procedure, it works as intended.
Thank you for fixing :)

Copy link
Contributor

@hyp0dermik-code hyp0dermik-code left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Confirmed that this fixes the bug described. Also thanks to Damosvil for the explanation, this flag should not be cleared until https://github.com/bird-sanctuary/bluejay/blob/80bd58803c50c0a9820634c2293101e299603e02/src/Bluejay.asm#L1073C22-L1073C22

at the earliest

@stylesuxx stylesuxx added fix and removed don't merge bug Something isn't working labels Nov 16, 2023
@stylesuxx stylesuxx merged commit 9212c5f into v0.21 Nov 16, 2023
@stylesuxx stylesuxx deleted the bugfix/exit_run_mode-keep-edt-flag-if-motor-direction-not-reversed branch July 23, 2024 10:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

EDT safety arm prevents motors activating subsequent to turtle mode,configurator
4 participants